#pragma once
#include "yzrutil.h"
#include "util/ParamRegister.h"
#include "dsp/DSP.h"

namespace yzrilyzr_dsp{
	ECLASS(DSP3D, public DSP){
	protected:
	u_index channel=0;
	public:
	u_normal_11 yaw=0;//归一化角度[-1,1]：0:正前 0.5:右 -0.5:左 -1或1:后
	u_normal_11 pitch=0;//归一化角度[-1,1]：0:正前 1:头顶 -1:底下
	u_sample distance=0;//米
	u_sample x=0;//-左+右，米
	u_sample y=0;//-下+上，米
	u_sample z=0;//-后+前，米
	void setPos(u_sample yaw, u_sample pitch, u_sample distance);
	void setPosXYZ(u_sample x, u_sample y, u_sample z);
	void setChannel(u_index ch);
	virtual void posChange()=0;
	u_index getChannel();
	};
}